% test script 

y1 = [2 2 3; 2 5 6; 2 8 9; 2 11 12];

y2 = rand(4, 3) / 10000;

xaxis = (1:4)';
%[ax,hBar,hLine] = plotyy(xaxis,y1,xaxis,y2,'bar','plot');

 
figure;
subplot(2,1,1);
bar(xaxis, y1,'stacked');
legend('e1', 'e2', 'e3');

subplot(2,1,2);
plot(xaxis,y2, 'LineWidth', 2);
legend('c1', 'c2', 'c3');
